1. Technical Field
This disclosure relates generally to data processing systems, and more specifically to techniques for providing dynamic context assist for a command line interface.
2. Description of the Related Art
A command line interface (CLI) provides a method of interacting with an operating system or other software using a command line interpreter, which may be a text terminal, a terminal emulator, or remote shell client. A CLI is typically used when a large vocabulary of commands or queries, coupled with a wide range of options, can be entered more rapidly as text than with a pure graphical user interface (GUI). CLIs are often used by programmers and system administrators (e.g., in engineering and scientific environments) and by technically advanced personal computer users. A CLI can generally be considered as consisting of syntax and semantics. The syntax is the grammar that all commands must follow. In the case of operating systems (OSes), each OS defines its own set of rules that all commands must follow. In the case of embedded systems, each vendor defines their own proprietary set of rules to which all commands within their CLI conform. In general, the rules also dictate how a user navigates through the system of commands and the semantics define what sort of operations are possible, and on what sort of data these operations can be performed. A relatively simple CLI usually displays a prompt to accept a command line that is typed by a user and terminated by an enter key.
Upon executing an entered command, a relatively simple CLI usually provides a textual display of a result (or an error message). Advanced CLIs usually validate, interpret and parameter-expand the command line before executing the specified command, and optionally capture or redirect the command's output. Unlike a button or menu item in a GUI, a command line is typically self-documenting, stating exactly what the user wants done. In addition, command lines usually include many defaults that can be changed to customize the results. Useful command lines can usually be stored by assigning a character string or alias to represent the full command, or several commands can usually be grouped to perform a more complex sequence, which creates a single entity called a command procedure or script which itself can be treated as a command.
In some CLIs, the commands issued are not coupled to any conceptual place within a command hierarchy. In this case, a user can specify relative or absolute paths to any command or data. Following this approach, resource protection is typically achieved by assigning resource ownership to privileged groups, and password-protecting user accounts which may be members of specific groups. Other CLIs (such as those employed in conjunction with routers) may limit the set of commands that a user can perform to a subset of commands which is determined by a location within a command hierarchy, e.g., grouped by association with security, a system, an interface, etc. The location within this hierarchy and the options available are often referred to as a mode. In such systems, a user might traverse through a series of sub-hierarchies, each with their own subset of commands. For example, if the CLI includes an interface mode and a system mode, a user may enter the word “interface” at a command prompt (i.e., a sequence of one or more characters used in a CLI to indicate readiness to accept commands) to enter the interface mode, where a predetermined subset of commands and data are available. In this case, system commands are not accessible until the user explicitly exits the interface mode.
CLIs for many products have become relatively complex. For example, the commands executed for CLIs associated with storage products have become increasingly complex in order to manage a relatively large number of object resources and resource states. Generally, existing methods for determining the necessary parameter values for a selected command requires multiple manual queries by a user. Such existing methods require a significant amount of typing on the part of the user. Moreover, existing methods require a user to manually record (e.g., write down or type) previously executed command results when such results scroll off of a display when a relatively large amount of data has been returned. In the case of users requiring assistive technologies (i.e., visually impaired and/or otherwise physically handicapped users), performing such manual actions become an even greater challenge.